<%@ Page Language="C#" MasterPageFile="~/MasterPages/manager/manager.master" AutoEventWireup="true" CodeFile="UpdateUserDetails.aspx.cs" Inherits="manager_members_UpdateUserDetails" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h2>Update User Details</h2>
    <p><a href="../default.aspx">Back to Home</a></p>
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="UserName" DataSourceID="odsMember">
        <EditItemTemplate>
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                Text="Save"></asp:LinkButton>&nbsp;
            <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel"></asp:LinkButton><br />
            <br />
            First Name:<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Firstname") %>'></asp:TextBox><br />
            Surname:
            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Surname") %>'></asp:TextBox><br />
            Email:
            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Email") %>'></asp:TextBox><br />
            <br />
            <strong>Change Password<br />
            </strong>Leave these fields blank to retain your current password.<br />
            New Password:
            <asp:TextBox ID="TextBox4" runat="server" TextMode="Password"></asp:TextBox><br />
            Confirm Password:
            <asp:TextBox ID="TextBox5" runat="server" TextMode="Password"></asp:TextBox>&nbsp;
        </EditItemTemplate>
        <InsertItemTemplate>
            ProviderName:
            <asp:TextBox ID="ProviderNameTextBox" runat="server" Text='<%# Bind("ProviderName") %>'>
            </asp:TextBox><br />
            IsOnline:
            <asp:CheckBox ID="IsOnlineCheckBox" runat="server" Checked='<%# Bind("IsOnline") %>' /><br />
            LastPasswordChangedDate:
            <asp:TextBox ID="LastPasswordChangedDateTextBox" runat="server" Text='<%# Bind("LastPasswordChangedDate") %>'>
            </asp:TextBox><br />
            PasswordQuestion:
            <asp:TextBox ID="PasswordQuestionTextBox" runat="server" Text='<%# Bind("PasswordQuestion") %>'>
            </asp:TextBox><br />
            LastLoginDate:
            <asp:TextBox ID="LastLoginDateTextBox" runat="server" Text='<%# Bind("LastLoginDate") %>'>
            </asp:TextBox><br />
            WebsiteID:
            <asp:TextBox ID="WebsiteIDTextBox" runat="server" Text='<%# Bind("WebsiteID") %>'>
            </asp:TextBox><br />
            Email:
            <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>'>
            </asp:TextBox><br />
            Comment:
            <asp:TextBox ID="CommentTextBox" runat="server" Text='<%# Bind("Comment") %>'>
            </asp:TextBox><br />
            IsApproved:
            <asp:CheckBox ID="IsApprovedCheckBox" runat="server" Checked='<%# Bind("IsApproved") %>' /><br />
            Firstname:
            <asp:TextBox ID="FirstnameTextBox" runat="server" Text='<%# Bind("Firstname") %>'>
            </asp:TextBox><br />
            LastLockoutDate:
            <asp:TextBox ID="LastLockoutDateTextBox" runat="server" Text='<%# Bind("LastLockoutDate") %>'>
            </asp:TextBox><br />
            CreationDate:
            <asp:TextBox ID="CreationDateTextBox" runat="server" Text='<%# Bind("CreationDate") %>'>
            </asp:TextBox><br />
            Surname:
            <asp:TextBox ID="SurnameTextBox" runat="server" Text='<%# Bind("Surname") %>'>
            </asp:TextBox><br />
            IsLockedOut:
            <asp:CheckBox ID="IsLockedOutCheckBox" runat="server" Checked='<%# Bind("IsLockedOut") %>' /><br />
            LastActivityDate:
            <asp:TextBox ID="LastActivityDateTextBox" runat="server" Text='<%# Bind("LastActivityDate") %>'>
            </asp:TextBox><br />
            ProviderUserKey:
            <asp:TextBox ID="ProviderUserKeyTextBox" runat="server" Text='<%# Bind("ProviderUserKey") %>'>
            </asp:TextBox><br />
            UserName:
            <asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>'>
            </asp:TextBox><br />
            CustomerID:
            <asp:TextBox ID="CustomerIDTextBox" runat="server" Text='<%# Bind("CustomerID") %>'>
            </asp:TextBox><br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                Text="Insert">
            </asp:LinkButton>
            <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel">
            </asp:LinkButton>
        </InsertItemTemplate>
        <ItemTemplate>
            Your User Information
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
                Text="Edit"></asp:LinkButton><br />
            <br />
            <asp:Literal ID="Literal1" runat="server" Text='<%# Eval("Firstname") + " " + Eval("Surname") %>'></asp:Literal><br />
            <asp:Literal ID="Literal2" runat="server" Text='<%# Eval("Email") %>'></asp:Literal><br />
        </ItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="odsMember" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetMembers" TypeName="MembershipUtilities.MembershipUserAndProfileODS"
        UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="UserName" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="userName" Type="String" />
            <asp:Parameter Name="email" Type="String" />
            <asp:Parameter Name="isLockedOut" Type="Boolean" />
            <asp:Parameter Name="isApproved" Type="Boolean" />
            <asp:Parameter Name="comment" Type="String" />
            <asp:Parameter Name="lastActivityDate" Type="DateTime" />
            <asp:Parameter Name="lastLoginDate" Type="DateTime" />
            <asp:Parameter Name="firstname" Type="String" />
            <asp:Parameter Name="surname" Type="String" />
            <asp:Parameter Name="customerID" Type="Int32" />
            <asp:Parameter Name="websiteID" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:Parameter Name="returnAllApprovedUsers" Type="Boolean" />
            <asp:Parameter Name="returnAllNotApprovedUsers" Type="Boolean" />
            <asp:ProfileParameter Name="usernameToFind" PropertyName="UserName" Type="String" />
            <asp:Parameter Name="sortData" Type="String" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="userName" Type="String" />
            <asp:Parameter Name="isApproved" Type="Boolean" />
            <asp:Parameter Name="comment" Type="String" />
            <asp:Parameter Name="lastLockoutDate" Type="DateTime" />
            <asp:Parameter Name="creationDate" Type="DateTime" />
            <asp:Parameter Name="email" Type="String" />
            <asp:Parameter Name="lastActivityDate" Type="DateTime" />
            <asp:Parameter Name="providerName" Type="String" />
            <asp:Parameter Name="isLockedOut" Type="Boolean" />
            <asp:Parameter Name="lastLoginDate" Type="DateTime" />
            <asp:Parameter Name="isOnline" Type="Boolean" />
            <asp:Parameter Name="passwordQuestion" Type="String" />
            <asp:Parameter Name="lastPasswordChangedDate" Type="DateTime" />
            <asp:Parameter Name="password" Type="String" />
            <asp:Parameter Name="passwordAnswer" Type="String" />
            <asp:Parameter Name="firstname" Type="String" />
            <asp:Parameter Name="surname" Type="String" />
            <asp:Parameter Name="customerID" Type="Int32" />
            <asp:Parameter Name="websiteID" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>

